package cn.bdqn.controller.questionBank;

import cn.bdqn.pojo.questionBank.Industry;
import cn.bdqn.service.questionBank.IndustryService;
import cn.bdqn.utils.Json;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/industryAccountType")
public class IndustryAccountTypeController {

    @Autowired
    private IndustryService industryService;
    @PreAuthorize("hasAuthority('question:management')")
    @GetMapping("/selectAll")
    public Json selectAll(){
        return industryService.selectIndustryAccountType();
    }
    @PreAuthorize("hasAuthority('question:management')")
    @GetMapping("/select")
    public List<Industry> get(){
        return industryService.selectAllIndustry();
    }
}
